<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<title>Detalles de foto</title>
	<script type="text/javascript" src="funciones.js"></script>
	<link href="../../default.css" rel="stylesheet" type="text/css" />

</head>

<body>

<table>

<?php

$fid=$_GET['fid'];

$connection=mysql_connect("localhost","root","root",false,196608);
mysql_select_db("piaimu",$connection);

$query=mysql_query("SELECT IFNULL(nombre_foto, ''), tipo_foto, path_foto_ld, IFNULL(precio,'0') FROM foto WHERE id_foto=$fid AND act_foto='1';",$connection);
$rows=mysql_num_rows($query);

echo "<tr>";
	echo "<td><img src='../" . mysql_result($query,$i,2) . "' width='640' height='480'/></td>";
	echo "<td valign='bottom'><input id='btn_comprarFoto' type='button' onclick=\"window.location='comprarfoto.php?fid=" . $fid . "'\" value='Comprar' /></td>";
echo "</tr>";
echo "<tr>";
	echo "<td><span>" . mysql_result($query,$i,0) . "</span></td>";
echo "</tr>";

?>

</table>

</body>
</html>
